<?php

namespace IDock\Insurance\MACN\Request;

use IDock\Insurance\MACN\Response\ClearCacheResponse;
use IDock\Visitor\VehicleModelVisitor;

class ClearCacheRequest extends AllMACNRequest
{
    protected $requestType = '0054';

    protected $response = ClearCacheResponse::class;

    protected $urlTip = '缓存清理接口';
    /**
     * @var  VehicleModelVisitor $visitor
     */
    protected $visitor;

    public $vin;

    public $type;

    public function generate(): array
    {
        if ($this->type == 'vehicle') {
            $type = 'V43';

        } else {
            $type = '01,V0101';
        }

        return [
            'baseInfo' => [
                'picsCacheType' => $type,
                'frameNo' => $this->vin
            ]
        ];
    }
}
